import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'

const PRODUCTIONSYS: AppRouteRecordRaw = {
  path: '/productionSys',
  name: 'productionSys',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '生产系统',
    icon: 'icon-user',
    requiresAuth: true,
    order: 1
  },
  children: [
    {
      path: 'Information',
      name: 'Information',
      component: '',
      meta: {
        locale: '信息资料',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'supplier',
          name: 'supplier',
          component: () => import('@renderer/views/Information/supplier/index.vue'),
          meta: {
            locale: '供应商',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'company',
          name: 'company',
          component: () => import('@renderer/views/Information/company/index.vue'),
          meta: {
            locale: '客户',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'ProductInfo',
          name: 'ProductInfo',
          component: () => import('@renderer/views/Information/ProductInfo/index.vue'),
          meta: {
            locale: '产品信息',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'MaterialInfo',
          name: 'MaterialInfo',
          component: () => import('@renderer/views/Information/MaterialInfo/index.vue'),
          meta: {
            locale: '原材料信息',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'IngredientsInfo',
          name: 'IngredientsInfo',
          component: () => import('@renderer/views/Information/IngredientsInfo/index.vue'),
          meta: {
            locale: '辅料信息',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'employee',
          name: 'employee',
          meta: {
            locale: '员工',
            requiresAuth: true,
            roles: ['*'],
            hideChildrenInMenu: true
          },
          component: () => import('@renderer/views/Information/employee/index.vue')
        }
      ]
    },
    {
      path: 'SalesDep',
      name: 'SalesDep',
      component: '',
      meta: {
        locale: '销售部',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'quotation',
          name: 'Quotation',
          component: () => import('@renderer/views/salesDepartment/quotation/index.vue'),
          meta: {
            locale: '报价单',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'salesBill',
          name: 'SalesBill',
          component: () => import('@renderer/views/salesDepartment/salesBill/index.vue'),
          meta: {
            locale: '销售订单',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },
    {
      path: 'PurchasingDep',
      name: 'PurchasingDep',
      component: '',
      meta: {
        locale: '采购部',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'purchaseFinished',
          name: 'purchaseFinished',
          component: () =>
            import('@renderer/views/purchasingDepartment/purchaseFinished/index.vue'),
          meta: {
            locale: '成品采购',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'purchaseMaterial',
          name: 'purchaseMaterial',
          component: () => import('@renderer/views/purchasingDepartment/rawMaterial/index.vue'),
          meta: {
            locale: '原材料采购',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'purchaseIngredients',
          name: 'purchaseIngredients',
          component: () => import('@renderer/views/purchasingDepartment/ingredients/index.vue'),
          meta: {
            locale: '辅料采购',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'purchaseOther',
          name: 'purchaseOther',
          component: () => import('@renderer/views/purchasingDepartment/other/index.vue'),
          meta: {
            locale: '其它',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },

    {
      path: 'ProductDep',
      name: 'ProductDep',
      component: '',
      meta: {
        locale: '生产部',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'process',
          name: 'process',
          component: () => import('@renderer/views/productDep/process/index.vue'),
          meta: {
            locale: '工序及设备',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'productionPlan',
          name: 'productionPlan',
          component: () => import('@renderer/views/productDep/productionPlan/index.vue'),
          meta: {
            locale: '生产计划',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'productionFinish',
          name: 'productionFinish',
          component: () => import('@renderer/views/productDep/productionFinish/index.vue'),
          meta: {
            locale: '生产完成',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    },

    {
      path: 'WarehouseManage',
      name: 'WarehouseManage',
      component: '',
      meta: {
        locale: '仓储管理',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'InWarehouse',
          name: 'InWarehouse',
          component: '',
          meta: {
            locale: '入库',
            requiresAuth: true,
            roles: ['*']
          },
          children: [
            {
              path: 'materialInbound',
              name: 'materialInbound',
              component: () =>
                import('@renderer/views/warehouseManage/InWarehouse/material/index.vue'),
              meta: {
                locale: '原材料',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'ingredientsInbound',
              name: 'ingredientsInbound',
              component: () =>
                import('@renderer/views/warehouseManage/InWarehouse/ingredients/index.vue'),
              meta: {
                locale: '辅料',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'finishedInbound',
              name: 'finishedInbound',
              component: () =>
                import('@renderer/views/warehouseManage/InWarehouse/finished/index.vue'),
              meta: {
                locale: '成品',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'otherInbound',
              name: 'otherInbound',
              component: () =>
                import('@renderer/views/warehouseManage/InWarehouse/other/index.vue'),
              meta: {
                locale: '其它',
                requiresAuth: true,
                roles: ['*']
              }
            }
          ]
        },
        {
          path: 'OutWarehouse',
          name: 'OutWarehouse',
          component: '',
          meta: {
            locale: '出库',
            requiresAuth: true,
            roles: ['*']
          },
          children: [
            {
              path: 'materialOutbound',
              name: 'materialOutbound',
              component: () =>
                import('@renderer/views/warehouseManage/OutWarehouse/material/index.vue'),
              meta: {
                locale: '原材料',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'ingredientsOutbound',
              name: 'ingredientsOutbound',
              component: () =>
                import('@renderer/views/warehouseManage/OutWarehouse/ingredients/index.vue'),
              meta: {
                locale: '辅料',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'finishedOutbound',
              name: 'finishedOutbound',
              component: () =>
                import('@renderer/views/warehouseManage/OutWarehouse/finished/index.vue'),
              meta: {
                locale: '成品',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'otherOutbound',
              name: 'otherOutbound',
              component: () =>
                import('@renderer/views/warehouseManage/OutWarehouse/other/index.vue'),
              meta: {
                locale: '其它',
                requiresAuth: true,
                roles: ['*']
              }
            }
          ]
        },
        {
          path: 'Inventory',
          name: 'Inventory',
          component: '',
          meta: {
            locale: '库存',
            requiresAuth: true,
            roles: ['*']
          },
          children: [
            {
              path: 'materialInventory',
              name: 'materialInventory',
              component: () =>
                import('@renderer/views/warehouseManage/Inventory/material/index.vue'),
              meta: {
                locale: '原材料',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'finishedInventory',
              name: 'finishedInventory',
              component: () =>
                import('@renderer/views/warehouseManage/Inventory/finished/index.vue'),
              meta: {
                locale: '成品',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'ingredientsInventory',
              name: 'ingredientsInventory',
              component: () =>
                import('@renderer/views/warehouseManage/Inventory/ingredients/index.vue'),
              meta: {
                locale: '辅料',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'hangingInventory',
              name: 'hangingInventory',
              component: () =>
                import('@renderer/views/warehouseManage/Inventory/hanging/index.vue'),
              meta: {
                locale: '挂板',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'knifeInventory',
              name: 'knifeInventory',
              component: () => import('@renderer/views/warehouseManage/Inventory/knife/index.vue'),
              meta: {
                locale: '刀模板',
                requiresAuth: true,
                roles: ['*']
              }
            },
            {
              path: 'otherInventory',
              name: 'otherInventory',
              component: () => import('@renderer/views/warehouseManage/Inventory/other/index.vue'),
              meta: {
                locale: '其它',
                requiresAuth: true,
                roles: ['*']
              }
            }
          ]
        }
      ]
    },

    {
      path: 'logisticsDep',
      name: 'logisticsDep',
      component: '',
      meta: {
        locale: '出货物流',
        requiresAuth: true,
        roles: ['*']
      },
      children: [
        {
          path: 'deliveryDetail',
          name: 'deliveryDetail',
          component: () => import('@renderer/views/logisticsDep/deliveryDetail/index.vue'),
          meta: {
            locale: '送货明细',
            requiresAuth: true,
            roles: ['*']
          }
        },
        {
          path: 'returnReplenishment',
          name: 'returnReplenishment',
          component: () => import('@renderer/views/logisticsDep/returnReplenishment/index.vue'),
          meta: {
            locale: '退货补货',
            requiresAuth: true,
            roles: ['*']
          }
        }
      ]
    }
  ]
}

export default PRODUCTIONSYS
